<div class="page-content" >
	<div class="panel panel-default">
		<div class="panel-heading">
		<ul class="breadcrumb">
                    <li><a href="<{:addons_url('index')}>">活动列表</a></li>
                    <li >创建/修改</li>
                </ul>
		</div>
		<div class="panel-body">
			   <form enctype="multipart/form-data" class="form-horizontal" action="<{:addons_url('add')}>" method="post" id="myform">
            	  <input type="hidden"  name="id" value="<{$data.id}>">
                <div class="list_vmall_bort">
                	<div class="vmall_padi">
                    <div class="form-group">
                            <label for="input-title" class="col-sm-2 control-label">期数</label>
                            <div class="col-sm-7">
                                <input type="text" class="form-control" id="" name="topic" value="<{$data.topic}>">
       
                            </div>
                        </div>
                    	<div class="form-group">
                            <label for="input-title" class="col-sm-2 control-label">名称</label>
                            <div class="col-sm-7">
                                <input type="text" class="form-control" id="" name="title" value="<{$data.title}>">
       
                            </div>
                        </div>

                        <div class="form-group">
                            <label for="input-title" class="col-sm-2 control-label">结束时间</label>
                            <div class="col-sm-7">
                                <input type="text" data-format="yyyy-mm-dd hh:ii"  data-minview="0" data-type="datetimepicker" class="form-control datetimepicker" id="" name="expire_date" value="<{$data.expire_date}>">
       
                            </div>
                        </div>
				 
				 
	 
                        <div class="form-group">
                            <label for="input-title" class="col-sm-2 control-label">介绍</label>
                            <div class="col-sm-7">
                                <textarea name="info" class="form-control"><{$data.info}></textarea>   
                            </div>
                        </div>


                        <div class="form-group">
                            <label for="input-title" class="col-sm-2 control-label">奖品信息</label>
                            <div class="col-sm-7">
                                <textarea name="awards" class="form-control"><{$data.awards}></textarea>   
                            </div>
                        </div>
				 
				 
						 
						
                         <div class="form-group">
                                <label for="input-title" class="col-sm-2 control-label">图片</label>
                                <div class="col-sm-7">
                                    <div id="preview"></div>
                                    <input type="file" id="picname" name="picname" onchange="previewImage(this)"  /><span style="color:red;">(建议宽800左右的图片)</span>
                                    <if condition="$data['id']">
                                    	<img src="__Img__/<{$data.pic}>" width="50" style="display: inline;" />
                                    
                                    </if>
                            
                                </div>
                            </div>


                         
                       
                         <div class="form-group">
					<div class="col-sm-offset-2 col-sm-7">
						<button type="submit" class="btn btn-primary">保存</button>
					</div>
				</div>
                        
                      
                        
                    </div>
                </div>
                </form> 
		</div>
	</div>
</div>

<script>
 
$(function(){
    $(".form-horizontal").bootstrapValidator({
        message: '您填入的值不合法',
        fields:{
            topic: {
                message: '期数',
                validators: {
                    notEmpty: {
                        message: '期数不能为空'
                    },
                }
            },
			title: {
                message: '活动名称',
                validators: {
                    notEmpty: {
                        message: '活动名称不能为空'
                    },
                }
            },

            info: {
                message: '活动介绍不能为空',
                validators: {
                    notEmpty: {
                        message: '活动介绍不能为空'
                    },
                }
            }			  

        }
    });
	
 
});
 </script>
 
 



  